package test01;

/**
 * @Author czl
 * @Date 2024-04-09
 */
public class MainTest02 {
    public static void main(String[] args) {
       new Sum(){
           @Override
           public void sum(int a, int b) {
               System.out.println("匿名内部类：和:" + (a+b));
               System.out.println("匿名内部类：差:" + (a-b));
               System.out.println("匿名内部类：乘:" + (a*b));
               System.out.println("匿名内部类：积:" + (a/b));
           }
       }.sum(10,2);

    }
}
